1. Field of the Invention
The present invention relates to graphics processing apparatuses and methods, and more particularly, it relates to a graphics processing apparatus and method for projecting graphic elements required by a user onto a projection plane in a CAD (computer-aided design) system and for computing the distance between the graphic elements.
2. Description of the Related Art
Recently, the performance of computers has improved dramatically, and hence, various processes can be performed using computers. For example, CAD systems simulate designs, which can be viewed from various planes, on a computer. Although CAD systems used to require relatively expensive computers, many CAD systems now can be implemented on personal computers.
A combination of graphic elements, such as points, edge lines, planes, etc. are used for design in CAD systems, and it is necessary to compute the distance between these graphic elements.
The following methods for computing the distance between graphic elements are known:
(1) A method for computing the minimum distance between two elements, such as a point, an edge line, a plane, etc., which are a user's desired measurement objects designated in sequence by a user using an input device, such as a mouse, while displaying three-dimensional models to be measured on a computer display, and for displaying the resulting computed minimum distance using an additional display/output device.
(2) A method for computing the minimum distance between two elements, such as a point, an edge line, a plane, etc., which are a user's desired measurement objects, while displaying three-dimensional models to be measured on a computer display. In this method, the user uses an input device, such as a mouse, to move a position indicator, such as a pointer, toward two elements to be measured. When the distance between the graphic element displayed on the display and the pointer is within a predetermined distance, the color of the graphic element displayed on the display changes. The user confirms the elements to be measured, and the minimum distance in the three-dimensional space is computed. The resulting computed minimum distance is displayed using an additional display/output device.
(3) A method for computing the minimum distance between two elements, such as a point, an edge line, a plane, etc., which are a user's desired measurement objects, while displaying three-dimensional models to be measured on a computer display, and for displaying the resulting computed minimum distance using an additional display/output device. The user uses an input device, such as a mouse, to move a position indicator, such as a pointer, toward two elements to be measured. Of clipped graphic elements which are within a predetermined distance from a position determined by the user, an element which is closest to a view point in the three-dimensional space, that is, an element displayed in the foreground of the display, is regarded as an object to be measured. The minimum distance in the three-dimensional space is computed, and the resulting computed distance is displayed on the additional display/output device.
(4) A method according to the method described in (1), wherein an orthogonal projection of a line segment, which indicates the minimum distance, onto the user's desired projection plane is computed. Accordingly, the projected minimum distance between the elements in the three-dimensional space is computed.
(5) A method according to the method described in (2), wherein an orthogonal projection of a line segment, which indicates the minimum distance, onto the user's desired projection plane is computed. Accordingly, the projected minimum distance between elements is computed.
(6) A method according to the method described in (3), wherein an orthogonal projection of a line segment, which indicates the minimum distance, onto the user's desired projection plane is computed. Accordingly, the projected minimum distance between elements is computed.
(7) A method for computing the minimum distance between elements, as in Japanese Patent Laid-Open No. 10-31757 describing a graphics processing apparatus and a method for computing the minimum distance between elements, wherein the direction from which a user views a display displaying the three-dimensional space is taken into consideration.
FIGS. 30A and 30B show measurement results computed by the foregoing methods for computing the minimum distance between elements. Referring to FIG. 30A, a line 301 and an arc 302 are elements to be measured. A projection plane 303 is a plane onto which the elements are projected. A line segment 304 indicates the computed minimum distance, which is the measurement result.
Referring to FIG. 30B, an arc 301 and an arc 302 are elements to be measured. A projection plane 303 is a plane onto which the elements are projected. A line segment 304 indicates the computed minimum distance, which is the measurement result.
In the foregoing known methods for computing the minimum distance between elements, a few methods are employed to specify the plane onto which the elements are projected.
(A) In accordance with several projection planes, corresponding commands for computing the minimum distance between elements are prepared in advance. The user selects the command corresponding to a desired projection plane, and measurement is performed. FIG. 31 is a schematic illustration of this method. In accordance with three projection planes, namely, the xy plane, the yz plane, and the xz plane, corresponding commands for computing the minimum distance between elements are prepared in advance. For example, when the user wants to measure the distance between elements projected onto the yz plane, the user selects in advance the command for the yz plane projection, and measurement is performed.
(B) In a command for computing the distance between elements, a plurality of projection planes is set in advance. After the user has selected elements to be measured, the distances between the elements, which are projected onto all the prepared projection planes, are displayed at the same time or one after another. Of these measurement results, the user can selectively read the measurement result which is projected onto a desired projection plane. Accordingly, measurement is performed. FIG. 32 is a schematic illustration of this method. Three projection planes, namely, the xy plane, the yz plane, and the xz plane, are set in advance. All the measurement results, which are computed by projecting the elements onto these projection planes, are displayed. In this case, when all the measurement results are displayed at the same time, visibility for the user is obstructed. In actual use, the measurement results are generally displayed one at a time by operating an input device, such as a keyboard or a mouse.
(C) In a command for computing the minimum distance between elements, no projection plane is set. Similar to a case in which the user selects components to be measured, the user selects a projection plane. Accordingly, the minimum distance between elements projected onto the user's desired projection plane is computed. FIG. 33 is a schematic illustration of this method. The user selects graphic elements 331 and 332, which are elements to be measured, and a plane 333, which is the user's desired projection plane. As a result, the minimum distance projected onto the plane 333 is displayed. Generally, the projection plane can be selected by selecting a plane parallel to the user's desired projection plane, by selecting a line perpendicular to the user's desired projection plane and the position of the projection plane, or by freely switching a projection plane by the user.
(D) A method combining the foregoing methods described in (B) and (C). Specifically, a plurality of planes, which are candidates for a projection plane, is prepared in each command for computing the minimum distance between elements. These planes are preferentially displayed. When these planes do not include the result of projecting the elements which are projected onto the user's desired plane, the user can select the projection plane by a method similar to that described in (C).
In the methods described in (A) and (B), the user is not required to select the projection plane. However, measurement is performed using only the projection planes prepared in advance. Thus, these methods are not practical.
In the methods described in (C) and (D), the user can reliably select the user's desired projection plane. Thus, these methods are practical. However, the user is required to perform an operation to select the projection plane. This reduces the operating efficiency. When no plane parallel to the user's desired projection plane nor line perpendicular to the user's desired projection plane is displayed on the display screen, it is necessary to create and display a plane or a line, which is required for selecting the projection plane, on the display screen before implementing the command for computing the minimum distance between elements. Thus, the operating efficiency is further reduced.
In the above examples, when the number of components displayed on the display increases, the displayed components obstruct the user's view. It becomes difficult for the user to see the measurement result and to confirm whether or not the user's desired portions have been measured.
In order to confirm the measurement result, the user is forced to perform operations to change the viewing direction (the direction of the sight line) after the measurement result is displayed or to hide the components obstructing the user's sight line. These operations for changing the sight line or hiding the components reduce the user's operating efficiency. In addition, in order that the user who has confirmed the measurement result can return to the operation immediately before the minimum-distance measurement, the user is required to perform additional operations to again display the components and to return the viewing direction to its former state. As a result, the user's operating efficiency is further reduced. These operations cause serious problems with the usability of an apparatus for computing the minimum distance between elements.